package cn.edu.zust.se.jpadao;

import cn.edu.zust.se.jpaentity.Tuser;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * 
 * @author czg
 * @since 2022/11/16 15:58
 */
@Repository
public class UserDao {
    @PersistenceContext
    EntityManager em;
    public Tuser getUserById(int id){
        return em.find(Tuser.class,id);
    }
}
